package per.kongtouxu.domain.dto;

import java.util.HashMap;
import java.util.Map;

public class JsonDto {
    private Integer id; //设置id主要用于判断是否成功:1.成功 0.失败
    private String message;//设置返回信息
    private String location;//设置页面的跳转路径
    private Map<String,Object> datas = new HashMap<>();//存储数据

    public JsonDto() {
    }

    public JsonDto(Integer id, String message, String location, Map<String, Object> datas) {
        this.id = id;
        this.message = message;
        this.location = location;
        this.datas = datas;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public Map<String, Object> getDatas() {
        return datas;
    }

    public void setDatas(Map<String, Object> datas) {
        this.datas = datas;
    }

    @Override
    public String toString() {
        return "JsonDto{" +
                "id=" + id +
                ", message='" + message + '\'' +
                ", location='" + location + '\'' +
                ", datas=" + datas +
                '}';
    }
}
